import { network } from '@/utils';
import { DetailInfoPatams } from './data';

import { basic } from '../../../../../config/Apis';

export async function queryVIPUserManagementDetail(params: DetailInfoPatams) {
  return network.get(basic.vip, {
    params,
  });
}

export async function queryDiscountList(params: any) {
  return network.get(basic.vip_conf_list, {
    params,
  });
}

export async function saveVipUser(params: any) {
  return network.post(basic.vip_conf, { data: params });
}

export async function updateVipUser(params: any) {
  return network.put(basic.vip_conf, { data: params });
}

export async function queryDiscountData(params: any) {
  return network.get(basic.vip_conf, {
    params,
  });
}

export async function updateDiscount(params: any) {
  return network.put(basic.vip_discount, { data: params });
}

export async function performDeleteDiscount(params: any) {
  return network.deleter(basic.vip_discount, {
    params,
  });
}
